import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;


public class ROM {

    private File rom = new File("pkmyel.gbc");
    private byte[] b = new byte[(int)rom.length()];
    public ROM(){
        try { new DataInputStream(new FileInputStream(rom)).readFully(b); } catch (IOException e1) { e1.printStackTrace(); }
    }
    
    public int[] getBytes(int offset, int length){
    	int[] bytes = new int[length];
    	for (int i=offset;i<offset+length;i++){
    		bytes[i-offset]=b[i]&0xFF;
    	}
    	return bytes;
    }
}
